feat: add controllable switch for AC screen display#269
Closed
OoKyleoO wants to merge 1 commit into
Closed
Conversation
Owner
|
感谢贡献,这个功能需求本身是合理的。不过我认为目前这个实现方式不是一个合适的解决方案。 这个问题的根因是 Haier 服务器返回的设备模型不正确:实际可控制的属性被描述成了只读属性。通过新增 _ctrl switch 的方式是在集成层修复错误数据,会导致未来越来越多类似的特殊处理。 我觉得更合理的方式应该是自行本地修正对应 device JSON,或者增加一个通用的数据修正功能,让系统能够正确处理这类属性的读写能力。 |
Haier server sometimes reports writable attributes as read-only, so the screen display only shows up as a read-only binary_sensor. Instead of adding a special _ctrl entity in the integration layer, introduce a generic ATTRIBUTE_SPEC_FIXES table applied before parsing. Corrected attributes flow through the normal parser and yield proper controllable entities. screenDisplayStatus is corrected to writable.
3e88db8 to
13cc630
Compare
Author
好的 我重新修复一版~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
你好,本人的卡萨帝空调有屏显按钮,仓库里没有,已经测试没问题,申请pr
screenDisplayStatus is reported read-only by the digital model and only produces a binary_sensor. Generate an extra switch (data_key aliased) so the display can be toggled while keeping the sensor for state reading.